When a block of binary code associated with a software application in memory, such as flash memory, RAM memory, ROM memory, etc. has to be updated, as part of a version upgrade or as part of a bug-fix process, there are several issues to be considered. For one, the newer version of the software may differ significantly from an existing version in terms of size, functionality, etc. The newer version of the software may not fit into the space occupied by the existing version. Attempts to replace the existing version with the newer version by actual replacement of specific blocks of code with others may cause the relocation of several other blocks of code not directly related to the segment of code being replaced. Such relocations have several side-effects requiring the modifications of addresses and/or instructions in the relocated code in-order to keep them executable and operational.
The size of the update packages that may be sent to an electronic device as part of an update process is often of very important concern. Some electronic devices may be constrained in resources and unable to field the update packages sent to them. Even if they can store update packages sent to them, these electronic devices often lack additional free memory necessary to execute the instructions necessary to complete the update process.
It may be possible to reduce the size of an update package containing a new version of software that is sent to electronic devices. One important problem that needs to be solved while trying to reduce the size of an update package that is sent to electronic devices is the determination of code that is the same or similar in both existing and new software modules. Due to relocation of some code segments in the new memory image of the electronic device as compared to the existing memory image, often the same or similar software modules appear significantly different.
A related problem in determining how new memory images of software modules are different from existing memory images of the same software modules is the issue of byte alignments of data and operational codes. Two software modules that are essentially the same may occupy different amounts of memory if the layout of data and or code in one of the memory images forces the relocation of addresses due to alignment related issues.
Further limitations and disadvantages of conventional and traditional approaches will become apparent to one of skill in the art, through comparison of such systems with some aspects of the present invention as set forth in the remainder of the present application with reference to the drawings.